package com.neu.his.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.neu.his.entity.Department;
import com.neu.his.entity.VO.SystemManage01.DepartmentManage.DepartmentVO;
import com.neu.his.entity.request.Department.DepartmentParams;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DepartmentMapper extends BaseMapper<Department> {

    //查询对应id部门及其类别 id=-1时查询所有
    public List<Department> getDepartmentType(Long id);

    //查询对应id部门及其所属用户
    public List<Department> getDepartmentUser(Long id);

    //查询对应id部门及其挂号单
    public List<Department> getDepartmentRegist(Long id);

    public List<DepartmentVO> getDepartment(@Param("departmentParams") DepartmentParams departmentParams);

    public IPage<DepartmentVO> getDepartmentPage(Page page, @Param("departmentParams") DepartmentParams departmentParams);

    public void updateOne(Department department);

    public void deleteByIds(List<Long> ids);
}
